
/*
'===============================================================================
'  Generated From - CSharp_dOOdads_BusinessEntity.vbgen
' 
'  ** IMPORTANT  ** 
'  How to Generate your stored procedures:
' 
'  SQL        = SQL_StoredProcs.vbgen
'  ACCESS     = Access_StoredProcs.vbgen
'  ORACLE     = Oracle_StoredProcs.vbgen
'  FIREBIRD   = FirebirdStoredProcs.vbgen
'  POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
'  The supporting base class SqlClientEntity is in the Architecture directory in "dOOdads".
'  
'  This object is 'abstract' which means you need to inherit from it to be able
'  to instantiate it.  This is very easilly done. You can override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code. 
'
'  NEVER EDIT THIS FILE.
'
'  public class YourObject :  _YourObject
'  {
'
'  }
'
'===============================================================================
*/

// Generated by MyGeneration Version # (1.3.0.3)

using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using System.Collections.Specialized;

using MyGeneration.dOOdads;

namespace GlobalLogistics.DAL
{
	public abstract class _Companies : SqlClientEntity
	{
		public _Companies()
		{
			this.QuerySource = "Companies";
			this.MappingName = "Companies";

		}	

		//=================================================================
		//  public Overrides void AddNew()
		//=================================================================
		//
		//=================================================================
		public override void AddNew()
		{
			base.AddNew();
			
		}
		
		
		public override void FlushData()
		{
			this._whereClause = null;
			this._aggregateClause = null;
			base.FlushData();
		}
		
		//=================================================================
		//  	public Function LoadAll() As Boolean
		//=================================================================
		//  Loads all of the records in the database, and sets the currentRow to the first row
		//=================================================================
		public bool LoadAll() 
		{
			ListDictionary parameters = null;
			
			return base.LoadFromSql("[" + this.SchemaStoredProcedure + "proc_CompaniesLoadAll]", parameters);
		}
	
		//=================================================================
		// public Overridable Function LoadByPrimaryKey()  As Boolean
		//=================================================================
		//  Loads a single row of via the primary key
		//=================================================================
		public virtual bool LoadByPrimaryKey(int CompanyID)
		{
			ListDictionary parameters = new ListDictionary();
			parameters.Add(Parameters.CompanyID, CompanyID);

		
			return base.LoadFromSql("[" + this.SchemaStoredProcedure + "proc_CompaniesLoadByPrimaryKey]", parameters);
		}
		
		#region Parameters
		protected class Parameters
		{
			
			public static SqlParameter CompanyID
			{
				get
				{
					return new SqlParameter("@CompanyID", SqlDbType.Int, 0);
				}
			}
			
			public static SqlParameter EnName
			{
				get
				{
					return new SqlParameter("@EnName", SqlDbType.NVarChar, 200);
				}
			}
			
			public static SqlParameter ArName
			{
				get
				{
					return new SqlParameter("@ArName", SqlDbType.NVarChar, 200);
				}
			}
			
			public static SqlParameter EnAddress
			{
				get
				{
					return new SqlParameter("@EnAddress", SqlDbType.NVarChar, 500);
				}
			}
			
			public static SqlParameter ArAddress
			{
				get
				{
					return new SqlParameter("@ArAddress", SqlDbType.NVarChar, 500);
				}
			}
			
			public static SqlParameter UserName
			{
				get
				{
					return new SqlParameter("@UserName", SqlDbType.NVarChar, 50);
				}
			}
			
			public static SqlParameter Password
			{
				get
				{
					return new SqlParameter("@Password", SqlDbType.NVarChar, 50);
				}
			}
			
			public static SqlParameter CityID
			{
				get
				{
					return new SqlParameter("@CityID", SqlDbType.Int, 0);
				}
			}
			
			public static SqlParameter CategoryID
			{
				get
				{
					return new SqlParameter("@CategoryID", SqlDbType.Int, 0);
				}
			}
			
			public static SqlParameter SubCategoryID
			{
				get
				{
					return new SqlParameter("@SubCategoryID", SqlDbType.Int, 0);
				}
			}
			
			public static SqlParameter Tele
			{
				get
				{
					return new SqlParameter("@Tele", SqlDbType.NVarChar, 120);
				}
			}
			
			public static SqlParameter Fax
			{
				get
				{
					return new SqlParameter("@Fax", SqlDbType.NVarChar, 120);
				}
			}
			
			public static SqlParameter WebSite
			{
				get
				{
					return new SqlParameter("@WebSite", SqlDbType.NVarChar, 200);
				}
			}
			
			public static SqlParameter LogoPath
			{
				get
				{
					return new SqlParameter("@LogoPath", SqlDbType.NVarChar, 300);
				}
			}
			
			public static SqlParameter EnBranches
			{
				get
				{
					return new SqlParameter("@EnBranches", SqlDbType.NVarChar, 1073741823);
				}
			}
			
			public static SqlParameter ArBranches
			{
				get
				{
					return new SqlParameter("@ArBranches", SqlDbType.NVarChar, 1073741823);
				}
			}
			
			public static SqlParameter MapPath
			{
				get
				{
					return new SqlParameter("@MapPath", SqlDbType.NVarChar, 1073741823);
				}
			}
			
			public static SqlParameter EnAbout
			{
				get
				{
					return new SqlParameter("@EnAbout", SqlDbType.NVarChar, 1073741823);
				}
			}
			
			public static SqlParameter ArAbout
			{
				get
				{
					return new SqlParameter("@ArAbout", SqlDbType.NVarChar, 1073741823);
				}
			}
			
			public static SqlParameter EnContact
			{
				get
				{
					return new SqlParameter("@EnContact", SqlDbType.NVarChar, 1000);
				}
			}
			
			public static SqlParameter ArContact
			{
				get
				{
					return new SqlParameter("@ArContact", SqlDbType.NVarChar, 1000);
				}
			}
			
			public static SqlParameter PackageTypeID
			{
				get
				{
					return new SqlParameter("@PackageTypeID", SqlDbType.Int, 0);
				}
			}
			
			public static SqlParameter SchedulePath
			{
				get
				{
					return new SqlParameter("@SchedulePath", SqlDbType.NVarChar, 300);
				}
			}
			
		}
		#endregion		
	
		#region ColumnNames
		public class ColumnNames
		{  
            public const string CompanyID = "CompanyID";
            public const string EnName = "EnName";
            public const string ArName = "ArName";
            public const string EnAddress = "EnAddress";
            public const string ArAddress = "ArAddress";
            public const string UserName = "UserName";
            public const string Password = "password";
            public const string CityID = "CityID";
            public const string CategoryID = "CategoryID";
            public const string SubCategoryID = "SubCategoryID";
            public const string Tele = "Tele";
            public const string Fax = "Fax";
            public const string WebSite = "WebSite";
            public const string LogoPath = "LogoPath";
            public const string EnBranches = "EnBranches";
            public const string ArBranches = "ArBranches";
            public const string MapPath = "MapPath";
            public const string EnAbout = "EnAbout";
            public const string ArAbout = "ArAbout";
            public const string EnContact = "EnContact";
            public const string ArContact = "ArContact";
            public const string PackageTypeID = "PackageTypeID";
            public const string SchedulePath = "SchedulePath";

			static public string ToPropertyName(string columnName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[CompanyID] = _Companies.PropertyNames.CompanyID;
					ht[EnName] = _Companies.PropertyNames.EnName;
					ht[ArName] = _Companies.PropertyNames.ArName;
					ht[EnAddress] = _Companies.PropertyNames.EnAddress;
					ht[ArAddress] = _Companies.PropertyNames.ArAddress;
					ht[UserName] = _Companies.PropertyNames.UserName;
					ht[Password] = _Companies.PropertyNames.Password;
					ht[CityID] = _Companies.PropertyNames.CityID;
					ht[CategoryID] = _Companies.PropertyNames.CategoryID;
					ht[SubCategoryID] = _Companies.PropertyNames.SubCategoryID;
					ht[Tele] = _Companies.PropertyNames.Tele;
					ht[Fax] = _Companies.PropertyNames.Fax;
					ht[WebSite] = _Companies.PropertyNames.WebSite;
					ht[LogoPath] = _Companies.PropertyNames.LogoPath;
					ht[EnBranches] = _Companies.PropertyNames.EnBranches;
					ht[ArBranches] = _Companies.PropertyNames.ArBranches;
					ht[MapPath] = _Companies.PropertyNames.MapPath;
					ht[EnAbout] = _Companies.PropertyNames.EnAbout;
					ht[ArAbout] = _Companies.PropertyNames.ArAbout;
					ht[EnContact] = _Companies.PropertyNames.EnContact;
					ht[ArContact] = _Companies.PropertyNames.ArContact;
					ht[PackageTypeID] = _Companies.PropertyNames.PackageTypeID;
					ht[SchedulePath] = _Companies.PropertyNames.SchedulePath;

				}
				return (string)ht[columnName];
			}

			static private Hashtable ht = null;			 
		}
		#endregion
		
		#region PropertyNames
		public class PropertyNames
		{  
            public const string CompanyID = "CompanyID";
            public const string EnName = "EnName";
            public const string ArName = "ArName";
            public const string EnAddress = "EnAddress";
            public const string ArAddress = "ArAddress";
            public const string UserName = "UserName";
            public const string Password = "Password";
            public const string CityID = "CityID";
            public const string CategoryID = "CategoryID";
            public const string SubCategoryID = "SubCategoryID";
            public const string Tele = "Tele";
            public const string Fax = "Fax";
            public const string WebSite = "WebSite";
            public const string LogoPath = "LogoPath";
            public const string EnBranches = "EnBranches";
            public const string ArBranches = "ArBranches";
            public const string MapPath = "MapPath";
            public const string EnAbout = "EnAbout";
            public const string ArAbout = "ArAbout";
            public const string EnContact = "EnContact";
            public const string ArContact = "ArContact";
            public const string PackageTypeID = "PackageTypeID";
            public const string SchedulePath = "SchedulePath";

			static public string ToColumnName(string propertyName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[CompanyID] = _Companies.ColumnNames.CompanyID;
					ht[EnName] = _Companies.ColumnNames.EnName;
					ht[ArName] = _Companies.ColumnNames.ArName;
					ht[EnAddress] = _Companies.ColumnNames.EnAddress;
					ht[ArAddress] = _Companies.ColumnNames.ArAddress;
					ht[UserName] = _Companies.ColumnNames.UserName;
					ht[Password] = _Companies.ColumnNames.Password;
					ht[CityID] = _Companies.ColumnNames.CityID;
					ht[CategoryID] = _Companies.ColumnNames.CategoryID;
					ht[SubCategoryID] = _Companies.ColumnNames.SubCategoryID;
					ht[Tele] = _Companies.ColumnNames.Tele;
					ht[Fax] = _Companies.ColumnNames.Fax;
					ht[WebSite] = _Companies.ColumnNames.WebSite;
					ht[LogoPath] = _Companies.ColumnNames.LogoPath;
					ht[EnBranches] = _Companies.ColumnNames.EnBranches;
					ht[ArBranches] = _Companies.ColumnNames.ArBranches;
					ht[MapPath] = _Companies.ColumnNames.MapPath;
					ht[EnAbout] = _Companies.ColumnNames.EnAbout;
					ht[ArAbout] = _Companies.ColumnNames.ArAbout;
					ht[EnContact] = _Companies.ColumnNames.EnContact;
					ht[ArContact] = _Companies.ColumnNames.ArContact;
					ht[PackageTypeID] = _Companies.ColumnNames.PackageTypeID;
					ht[SchedulePath] = _Companies.ColumnNames.SchedulePath;

				}
				return (string)ht[propertyName];
			}

			static private Hashtable ht = null;			 
		}			 
		#endregion	

		#region StringPropertyNames
		public class StringPropertyNames
		{  
            public const string CompanyID = "s_CompanyID";
            public const string EnName = "s_EnName";
            public const string ArName = "s_ArName";
            public const string EnAddress = "s_EnAddress";
            public const string ArAddress = "s_ArAddress";
            public const string UserName = "s_UserName";
            public const string Password = "s_Password";
            public const string CityID = "s_CityID";
            public const string CategoryID = "s_CategoryID";
            public const string SubCategoryID = "s_SubCategoryID";
            public const string Tele = "s_Tele";
            public const string Fax = "s_Fax";
            public const string WebSite = "s_WebSite";
            public const string LogoPath = "s_LogoPath";
            public const string EnBranches = "s_EnBranches";
            public const string ArBranches = "s_ArBranches";
            public const string MapPath = "s_MapPath";
            public const string EnAbout = "s_EnAbout";
            public const string ArAbout = "s_ArAbout";
            public const string EnContact = "s_EnContact";
            public const string ArContact = "s_ArContact";
            public const string PackageTypeID = "s_PackageTypeID";
            public const string SchedulePath = "s_SchedulePath";

		}
		#endregion		
		
		#region Properties
	
		public virtual int CompanyID
	    {
			get
	        {
				return base.Getint(ColumnNames.CompanyID);
			}
			set
	        {
				base.Setint(ColumnNames.CompanyID, value);
			}
		}

		public virtual string EnName
	    {
			get
	        {
				return base.Getstring(ColumnNames.EnName);
			}
			set
	        {
				base.Setstring(ColumnNames.EnName, value);
			}
		}

		public virtual string ArName
	    {
			get
	        {
				return base.Getstring(ColumnNames.ArName);
			}
			set
	        {
				base.Setstring(ColumnNames.ArName, value);
			}
		}

		public virtual string EnAddress
	    {
			get
	        {
				return base.Getstring(ColumnNames.EnAddress);
			}
			set
	        {
				base.Setstring(ColumnNames.EnAddress, value);
			}
		}

		public virtual string ArAddress
	    {
			get
	        {
				return base.Getstring(ColumnNames.ArAddress);
			}
			set
	        {
				base.Setstring(ColumnNames.ArAddress, value);
			}
		}

		public virtual string UserName
	    {
			get
	        {
				return base.Getstring(ColumnNames.UserName);
			}
			set
	        {
				base.Setstring(ColumnNames.UserName, value);
			}
		}

		public virtual string Password
	    {
			get
	        {
				return base.Getstring(ColumnNames.Password);
			}
			set
	        {
				base.Setstring(ColumnNames.Password, value);
			}
		}

		public virtual int CityID
	    {
			get
	        {
				return base.Getint(ColumnNames.CityID);
			}
			set
	        {
				base.Setint(ColumnNames.CityID, value);
			}
		}

		public virtual int CategoryID
	    {
			get
	        {
				return base.Getint(ColumnNames.CategoryID);
			}
			set
	        {
				base.Setint(ColumnNames.CategoryID, value);
			}
		}

		public virtual int SubCategoryID
	    {
			get
	        {
				return base.Getint(ColumnNames.SubCategoryID);
			}
			set
	        {
				base.Setint(ColumnNames.SubCategoryID, value);
			}
		}

		public virtual string Tele
	    {
			get
	        {
				return base.Getstring(ColumnNames.Tele);
			}
			set
	        {
				base.Setstring(ColumnNames.Tele, value);
			}
		}

		public virtual string Fax
	    {
			get
	        {
				return base.Getstring(ColumnNames.Fax);
			}
			set
	        {
				base.Setstring(ColumnNames.Fax, value);
			}
		}

		public virtual string WebSite
	    {
			get
	        {
				return base.Getstring(ColumnNames.WebSite);
			}
			set
	        {
				base.Setstring(ColumnNames.WebSite, value);
			}
		}

		public virtual string LogoPath
	    {
			get
	        {
				return base.Getstring(ColumnNames.LogoPath);
			}
			set
	        {
				base.Setstring(ColumnNames.LogoPath, value);
			}
		}

		public virtual string EnBranches
	    {
			get
	        {
				return base.Getstring(ColumnNames.EnBranches);
			}
			set
	        {
				base.Setstring(ColumnNames.EnBranches, value);
			}
		}

		public virtual string ArBranches
	    {
			get
	        {
				return base.Getstring(ColumnNames.ArBranches);
			}
			set
	        {
				base.Setstring(ColumnNames.ArBranches, value);
			}
		}

		public virtual string MapPath
	    {
			get
	        {
				return base.Getstring(ColumnNames.MapPath);
			}
			set
	        {
				base.Setstring(ColumnNames.MapPath, value);
			}
		}

		public virtual string EnAbout
	    {
			get
	        {
				return base.Getstring(ColumnNames.EnAbout);
			}
			set
	        {
				base.Setstring(ColumnNames.EnAbout, value);
			}
		}

		public virtual string ArAbout
	    {
			get
	        {
				return base.Getstring(ColumnNames.ArAbout);
			}
			set
	        {
				base.Setstring(ColumnNames.ArAbout, value);
			}
		}

		public virtual string EnContact
	    {
			get
	        {
				return base.Getstring(ColumnNames.EnContact);
			}
			set
	        {
				base.Setstring(ColumnNames.EnContact, value);
			}
		}

		public virtual string ArContact
	    {
			get
	        {
				return base.Getstring(ColumnNames.ArContact);
			}
			set
	        {
				base.Setstring(ColumnNames.ArContact, value);
			}
		}

		public virtual int PackageTypeID
	    {
			get
	        {
				return base.Getint(ColumnNames.PackageTypeID);
			}
			set
	        {
				base.Setint(ColumnNames.PackageTypeID, value);
			}
		}

		public virtual string SchedulePath
	    {
			get
	        {
				return base.Getstring(ColumnNames.SchedulePath);
			}
			set
	        {
				base.Setstring(ColumnNames.SchedulePath, value);
			}
		}


		#endregion
		
		#region String Properties
	
		public virtual string s_CompanyID
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.CompanyID) ? string.Empty : base.GetintAsString(ColumnNames.CompanyID);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.CompanyID);
				else
					this.CompanyID = base.SetintAsString(ColumnNames.CompanyID, value);
			}
		}

		public virtual string s_EnName
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.EnName) ? string.Empty : base.GetstringAsString(ColumnNames.EnName);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.EnName);
				else
					this.EnName = base.SetstringAsString(ColumnNames.EnName, value);
			}
		}

		public virtual string s_ArName
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.ArName) ? string.Empty : base.GetstringAsString(ColumnNames.ArName);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.ArName);
				else
					this.ArName = base.SetstringAsString(ColumnNames.ArName, value);
			}
		}

		public virtual string s_EnAddress
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.EnAddress) ? string.Empty : base.GetstringAsString(ColumnNames.EnAddress);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.EnAddress);
				else
					this.EnAddress = base.SetstringAsString(ColumnNames.EnAddress, value);
			}
		}

		public virtual string s_ArAddress
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.ArAddress) ? string.Empty : base.GetstringAsString(ColumnNames.ArAddress);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.ArAddress);
				else
					this.ArAddress = base.SetstringAsString(ColumnNames.ArAddress, value);
			}
		}

		public virtual string s_UserName
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.UserName) ? string.Empty : base.GetstringAsString(ColumnNames.UserName);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.UserName);
				else
					this.UserName = base.SetstringAsString(ColumnNames.UserName, value);
			}
		}

		public virtual string s_Password
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Password) ? string.Empty : base.GetstringAsString(ColumnNames.Password);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Password);
				else
					this.Password = base.SetstringAsString(ColumnNames.Password, value);
			}
		}

		public virtual string s_CityID
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.CityID) ? string.Empty : base.GetintAsString(ColumnNames.CityID);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.CityID);
				else
					this.CityID = base.SetintAsString(ColumnNames.CityID, value);
			}
		}

		public virtual string s_CategoryID
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.CategoryID) ? string.Empty : base.GetintAsString(ColumnNames.CategoryID);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.CategoryID);
				else
					this.CategoryID = base.SetintAsString(ColumnNames.CategoryID, value);
			}
		}

		public virtual string s_SubCategoryID
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.SubCategoryID) ? string.Empty : base.GetintAsString(ColumnNames.SubCategoryID);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.SubCategoryID);
				else
					this.SubCategoryID = base.SetintAsString(ColumnNames.SubCategoryID, value);
			}
		}

		public virtual string s_Tele
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Tele) ? string.Empty : base.GetstringAsString(ColumnNames.Tele);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Tele);
				else
					this.Tele = base.SetstringAsString(ColumnNames.Tele, value);
			}
		}

		public virtual string s_Fax
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Fax) ? string.Empty : base.GetstringAsString(ColumnNames.Fax);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Fax);
				else
					this.Fax = base.SetstringAsString(ColumnNames.Fax, value);
			}
		}

		public virtual string s_WebSite
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.WebSite) ? string.Empty : base.GetstringAsString(ColumnNames.WebSite);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.WebSite);
				else
					this.WebSite = base.SetstringAsString(ColumnNames.WebSite, value);
			}
		}

		public virtual string s_LogoPath
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.LogoPath) ? string.Empty : base.GetstringAsString(ColumnNames.LogoPath);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.LogoPath);
				else
					this.LogoPath = base.SetstringAsString(ColumnNames.LogoPath, value);
			}
		}

		public virtual string s_EnBranches
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.EnBranches) ? string.Empty : base.GetstringAsString(ColumnNames.EnBranches);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.EnBranches);
				else
					this.EnBranches = base.SetstringAsString(ColumnNames.EnBranches, value);
			}
		}

		public virtual string s_ArBranches
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.ArBranches) ? string.Empty : base.GetstringAsString(ColumnNames.ArBranches);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.ArBranches);
				else
					this.ArBranches = base.SetstringAsString(ColumnNames.ArBranches, value);
			}
		}

		public virtual string s_MapPath
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.MapPath) ? string.Empty : base.GetstringAsString(ColumnNames.MapPath);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.MapPath);
				else
					this.MapPath = base.SetstringAsString(ColumnNames.MapPath, value);
			}
		}

		public virtual string s_EnAbout
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.EnAbout) ? string.Empty : base.GetstringAsString(ColumnNames.EnAbout);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.EnAbout);
				else
					this.EnAbout = base.SetstringAsString(ColumnNames.EnAbout, value);
			}
		}

		public virtual string s_ArAbout
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.ArAbout) ? string.Empty : base.GetstringAsString(ColumnNames.ArAbout);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.ArAbout);
				else
					this.ArAbout = base.SetstringAsString(ColumnNames.ArAbout, value);
			}
		}

		public virtual string s_EnContact
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.EnContact) ? string.Empty : base.GetstringAsString(ColumnNames.EnContact);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.EnContact);
				else
					this.EnContact = base.SetstringAsString(ColumnNames.EnContact, value);
			}
		}

		public virtual string s_ArContact
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.ArContact) ? string.Empty : base.GetstringAsString(ColumnNames.ArContact);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.ArContact);
				else
					this.ArContact = base.SetstringAsString(ColumnNames.ArContact, value);
			}
		}

		public virtual string s_PackageTypeID
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.PackageTypeID) ? string.Empty : base.GetintAsString(ColumnNames.PackageTypeID);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.PackageTypeID);
				else
					this.PackageTypeID = base.SetintAsString(ColumnNames.PackageTypeID, value);
			}
		}

		public virtual string s_SchedulePath
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.SchedulePath) ? string.Empty : base.GetstringAsString(ColumnNames.SchedulePath);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.SchedulePath);
				else
					this.SchedulePath = base.SetstringAsString(ColumnNames.SchedulePath, value);
			}
		}


		#endregion		
	
		#region Where Clause
		public class WhereClause
		{
			public WhereClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffWhereParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffWhereParameter(this);
					}

					return _tearOff;
				}
			}

			#region WhereParameter TearOff's
			public class TearOffWhereParameter
			{
				public TearOffWhereParameter(WhereClause clause)
				{
					this._clause = clause;
				}
				
				
				public WhereParameter CompanyID
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.CompanyID, Parameters.CompanyID);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter EnName
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.EnName, Parameters.EnName);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter ArName
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.ArName, Parameters.ArName);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter EnAddress
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.EnAddress, Parameters.EnAddress);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter ArAddress
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.ArAddress, Parameters.ArAddress);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter UserName
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.UserName, Parameters.UserName);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Password
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Password, Parameters.Password);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter CityID
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.CityID, Parameters.CityID);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter CategoryID
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.CategoryID, Parameters.CategoryID);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter SubCategoryID
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.SubCategoryID, Parameters.SubCategoryID);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Tele
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Tele, Parameters.Tele);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Fax
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Fax, Parameters.Fax);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter WebSite
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.WebSite, Parameters.WebSite);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter LogoPath
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.LogoPath, Parameters.LogoPath);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter EnBranches
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.EnBranches, Parameters.EnBranches);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter ArBranches
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.ArBranches, Parameters.ArBranches);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter MapPath
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.MapPath, Parameters.MapPath);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter EnAbout
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.EnAbout, Parameters.EnAbout);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter ArAbout
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.ArAbout, Parameters.ArAbout);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter EnContact
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.EnContact, Parameters.EnContact);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter ArContact
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.ArContact, Parameters.ArContact);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter PackageTypeID
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.PackageTypeID, Parameters.PackageTypeID);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter SchedulePath
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.SchedulePath, Parameters.SchedulePath);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}


				private WhereClause _clause;
			}
			#endregion
		
			public WhereParameter CompanyID
		    {
				get
		        {
					if(_CompanyID_W == null)
	        	    {
						_CompanyID_W = TearOff.CompanyID;
					}
					return _CompanyID_W;
				}
			}

			public WhereParameter EnName
		    {
				get
		        {
					if(_EnName_W == null)
	        	    {
						_EnName_W = TearOff.EnName;
					}
					return _EnName_W;
				}
			}

			public WhereParameter ArName
		    {
				get
		        {
					if(_ArName_W == null)
	        	    {
						_ArName_W = TearOff.ArName;
					}
					return _ArName_W;
				}
			}

			public WhereParameter EnAddress
		    {
				get
		        {
					if(_EnAddress_W == null)
	        	    {
						_EnAddress_W = TearOff.EnAddress;
					}
					return _EnAddress_W;
				}
			}

			public WhereParameter ArAddress
		    {
				get
		        {
					if(_ArAddress_W == null)
	        	    {
						_ArAddress_W = TearOff.ArAddress;
					}
					return _ArAddress_W;
				}
			}

			public WhereParameter UserName
		    {
				get
		        {
					if(_UserName_W == null)
	        	    {
						_UserName_W = TearOff.UserName;
					}
					return _UserName_W;
				}
			}

			public WhereParameter Password
		    {
				get
		        {
					if(_Password_W == null)
	        	    {
						_Password_W = TearOff.Password;
					}
					return _Password_W;
				}
			}

			public WhereParameter CityID
		    {
				get
		        {
					if(_CityID_W == null)
	        	    {
						_CityID_W = TearOff.CityID;
					}
					return _CityID_W;
				}
			}

			public WhereParameter CategoryID
		    {
				get
		        {
					if(_CategoryID_W == null)
	        	    {
						_CategoryID_W = TearOff.CategoryID;
					}
					return _CategoryID_W;
				}
			}

			public WhereParameter SubCategoryID
		    {
				get
		        {
					if(_SubCategoryID_W == null)
	        	    {
						_SubCategoryID_W = TearOff.SubCategoryID;
					}
					return _SubCategoryID_W;
				}
			}

			public WhereParameter Tele
		    {
				get
		        {
					if(_Tele_W == null)
	        	    {
						_Tele_W = TearOff.Tele;
					}
					return _Tele_W;
				}
			}

			public WhereParameter Fax
		    {
				get
		        {
					if(_Fax_W == null)
	        	    {
						_Fax_W = TearOff.Fax;
					}
					return _Fax_W;
				}
			}

			public WhereParameter WebSite
		    {
				get
		        {
					if(_WebSite_W == null)
	        	    {
						_WebSite_W = TearOff.WebSite;
					}
					return _WebSite_W;
				}
			}

			public WhereParameter LogoPath
		    {
				get
		        {
					if(_LogoPath_W == null)
	        	    {
						_LogoPath_W = TearOff.LogoPath;
					}
					return _LogoPath_W;
				}
			}

			public WhereParameter EnBranches
		    {
				get
		        {
					if(_EnBranches_W == null)
	        	    {
						_EnBranches_W = TearOff.EnBranches;
					}
					return _EnBranches_W;
				}
			}

			public WhereParameter ArBranches
		    {
				get
		        {
					if(_ArBranches_W == null)
	        	    {
						_ArBranches_W = TearOff.ArBranches;
					}
					return _ArBranches_W;
				}
			}

			public WhereParameter MapPath
		    {
				get
		        {
					if(_MapPath_W == null)
	        	    {
						_MapPath_W = TearOff.MapPath;
					}
					return _MapPath_W;
				}
			}

			public WhereParameter EnAbout
		    {
				get
		        {
					if(_EnAbout_W == null)
	        	    {
						_EnAbout_W = TearOff.EnAbout;
					}
					return _EnAbout_W;
				}
			}

			public WhereParameter ArAbout
		    {
				get
		        {
					if(_ArAbout_W == null)
	        	    {
						_ArAbout_W = TearOff.ArAbout;
					}
					return _ArAbout_W;
				}
			}

			public WhereParameter EnContact
		    {
				get
		        {
					if(_EnContact_W == null)
	        	    {
						_EnContact_W = TearOff.EnContact;
					}
					return _EnContact_W;
				}
			}

			public WhereParameter ArContact
		    {
				get
		        {
					if(_ArContact_W == null)
	        	    {
						_ArContact_W = TearOff.ArContact;
					}
					return _ArContact_W;
				}
			}

			public WhereParameter PackageTypeID
		    {
				get
		        {
					if(_PackageTypeID_W == null)
	        	    {
						_PackageTypeID_W = TearOff.PackageTypeID;
					}
					return _PackageTypeID_W;
				}
			}

			public WhereParameter SchedulePath
		    {
				get
		        {
					if(_SchedulePath_W == null)
	        	    {
						_SchedulePath_W = TearOff.SchedulePath;
					}
					return _SchedulePath_W;
				}
			}

			private WhereParameter _CompanyID_W = null;
			private WhereParameter _EnName_W = null;
			private WhereParameter _ArName_W = null;
			private WhereParameter _EnAddress_W = null;
			private WhereParameter _ArAddress_W = null;
			private WhereParameter _UserName_W = null;
			private WhereParameter _Password_W = null;
			private WhereParameter _CityID_W = null;
			private WhereParameter _CategoryID_W = null;
			private WhereParameter _SubCategoryID_W = null;
			private WhereParameter _Tele_W = null;
			private WhereParameter _Fax_W = null;
			private WhereParameter _WebSite_W = null;
			private WhereParameter _LogoPath_W = null;
			private WhereParameter _EnBranches_W = null;
			private WhereParameter _ArBranches_W = null;
			private WhereParameter _MapPath_W = null;
			private WhereParameter _EnAbout_W = null;
			private WhereParameter _ArAbout_W = null;
			private WhereParameter _EnContact_W = null;
			private WhereParameter _ArContact_W = null;
			private WhereParameter _PackageTypeID_W = null;
			private WhereParameter _SchedulePath_W = null;

			public void WhereClauseReset()
			{
				_CompanyID_W = null;
				_EnName_W = null;
				_ArName_W = null;
				_EnAddress_W = null;
				_ArAddress_W = null;
				_UserName_W = null;
				_Password_W = null;
				_CityID_W = null;
				_CategoryID_W = null;
				_SubCategoryID_W = null;
				_Tele_W = null;
				_Fax_W = null;
				_WebSite_W = null;
				_LogoPath_W = null;
				_EnBranches_W = null;
				_ArBranches_W = null;
				_MapPath_W = null;
				_EnAbout_W = null;
				_ArAbout_W = null;
				_EnContact_W = null;
				_ArContact_W = null;
				_PackageTypeID_W = null;
				_SchedulePath_W = null;

				this._entity.Query.FlushWhereParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffWhereParameter _tearOff;
			
		}
	
		public WhereClause Where
		{
			get
			{
				if(_whereClause == null)
				{
					_whereClause = new WhereClause(this);
				}
		
				return _whereClause;
			}
		}
		
		private WhereClause _whereClause = null;	
		#endregion
	
		#region Aggregate Clause
		public class AggregateClause
		{
			public AggregateClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffAggregateParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffAggregateParameter(this);
					}

					return _tearOff;
				}
			}

			#region AggregateParameter TearOff's
			public class TearOffAggregateParameter
			{
				public TearOffAggregateParameter(AggregateClause clause)
				{
					this._clause = clause;
				}
				
				
				public AggregateParameter CompanyID
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.CompanyID, Parameters.CompanyID);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter EnName
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.EnName, Parameters.EnName);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter ArName
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.ArName, Parameters.ArName);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter EnAddress
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.EnAddress, Parameters.EnAddress);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter ArAddress
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.ArAddress, Parameters.ArAddress);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter UserName
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.UserName, Parameters.UserName);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Password
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Password, Parameters.Password);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter CityID
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.CityID, Parameters.CityID);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter CategoryID
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.CategoryID, Parameters.CategoryID);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter SubCategoryID
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.SubCategoryID, Parameters.SubCategoryID);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Tele
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Tele, Parameters.Tele);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Fax
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Fax, Parameters.Fax);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter WebSite
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.WebSite, Parameters.WebSite);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter LogoPath
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.LogoPath, Parameters.LogoPath);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter EnBranches
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.EnBranches, Parameters.EnBranches);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter ArBranches
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.ArBranches, Parameters.ArBranches);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter MapPath
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.MapPath, Parameters.MapPath);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter EnAbout
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.EnAbout, Parameters.EnAbout);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter ArAbout
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.ArAbout, Parameters.ArAbout);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter EnContact
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.EnContact, Parameters.EnContact);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter ArContact
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.ArContact, Parameters.ArContact);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter PackageTypeID
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.PackageTypeID, Parameters.PackageTypeID);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter SchedulePath
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.SchedulePath, Parameters.SchedulePath);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}


				private AggregateClause _clause;
			}
			#endregion
		
			public AggregateParameter CompanyID
		    {
				get
		        {
					if(_CompanyID_W == null)
	        	    {
						_CompanyID_W = TearOff.CompanyID;
					}
					return _CompanyID_W;
				}
			}

			public AggregateParameter EnName
		    {
				get
		        {
					if(_EnName_W == null)
	        	    {
						_EnName_W = TearOff.EnName;
					}
					return _EnName_W;
				}
			}

			public AggregateParameter ArName
		    {
				get
		        {
					if(_ArName_W == null)
	        	    {
						_ArName_W = TearOff.ArName;
					}
					return _ArName_W;
				}
			}

			public AggregateParameter EnAddress
		    {
				get
		        {
					if(_EnAddress_W == null)
	        	    {
						_EnAddress_W = TearOff.EnAddress;
					}
					return _EnAddress_W;
				}
			}

			public AggregateParameter ArAddress
		    {
				get
		        {
					if(_ArAddress_W == null)
	        	    {
						_ArAddress_W = TearOff.ArAddress;
					}
					return _ArAddress_W;
				}
			}

			public AggregateParameter UserName
		    {
				get
		        {
					if(_UserName_W == null)
	        	    {
						_UserName_W = TearOff.UserName;
					}
					return _UserName_W;
				}
			}

			public AggregateParameter Password
		    {
				get
		        {
					if(_Password_W == null)
	        	    {
						_Password_W = TearOff.Password;
					}
					return _Password_W;
				}
			}

			public AggregateParameter CityID
		    {
				get
		        {
					if(_CityID_W == null)
	        	    {
						_CityID_W = TearOff.CityID;
					}
					return _CityID_W;
				}
			}

			public AggregateParameter CategoryID
		    {
				get
		        {
					if(_CategoryID_W == null)
	        	    {
						_CategoryID_W = TearOff.CategoryID;
					}
					return _CategoryID_W;
				}
			}

			public AggregateParameter SubCategoryID
		    {
				get
		        {
					if(_SubCategoryID_W == null)
	        	    {
						_SubCategoryID_W = TearOff.SubCategoryID;
					}
					return _SubCategoryID_W;
				}
			}

			public AggregateParameter Tele
		    {
				get
		        {
					if(_Tele_W == null)
	        	    {
						_Tele_W = TearOff.Tele;
					}
					return _Tele_W;
				}
			}

			public AggregateParameter Fax
		    {
				get
		        {
					if(_Fax_W == null)
	        	    {
						_Fax_W = TearOff.Fax;
					}
					return _Fax_W;
				}
			}

			public AggregateParameter WebSite
		    {
				get
		        {
					if(_WebSite_W == null)
	        	    {
						_WebSite_W = TearOff.WebSite;
					}
					return _WebSite_W;
				}
			}

			public AggregateParameter LogoPath
		    {
				get
		        {
					if(_LogoPath_W == null)
	        	    {
						_LogoPath_W = TearOff.LogoPath;
					}
					return _LogoPath_W;
				}
			}

			public AggregateParameter EnBranches
		    {
				get
		        {
					if(_EnBranches_W == null)
	        	    {
						_EnBranches_W = TearOff.EnBranches;
					}
					return _EnBranches_W;
				}
			}

			public AggregateParameter ArBranches
		    {
				get
		        {
					if(_ArBranches_W == null)
	        	    {
						_ArBranches_W = TearOff.ArBranches;
					}
					return _ArBranches_W;
				}
			}

			public AggregateParameter MapPath
		    {
				get
		        {
					if(_MapPath_W == null)
	        	    {
						_MapPath_W = TearOff.MapPath;
					}
					return _MapPath_W;
				}
			}

			public AggregateParameter EnAbout
		    {
				get
		        {
					if(_EnAbout_W == null)
	        	    {
						_EnAbout_W = TearOff.EnAbout;
					}
					return _EnAbout_W;
				}
			}

			public AggregateParameter ArAbout
		    {
				get
		        {
					if(_ArAbout_W == null)
	        	    {
						_ArAbout_W = TearOff.ArAbout;
					}
					return _ArAbout_W;
				}
			}

			public AggregateParameter EnContact
		    {
				get
		        {
					if(_EnContact_W == null)
	        	    {
						_EnContact_W = TearOff.EnContact;
					}
					return _EnContact_W;
				}
			}

			public AggregateParameter ArContact
		    {
				get
		        {
					if(_ArContact_W == null)
	        	    {
						_ArContact_W = TearOff.ArContact;
					}
					return _ArContact_W;
				}
			}

			public AggregateParameter PackageTypeID
		    {
				get
		        {
					if(_PackageTypeID_W == null)
	        	    {
						_PackageTypeID_W = TearOff.PackageTypeID;
					}
					return _PackageTypeID_W;
				}
			}

			public AggregateParameter SchedulePath
		    {
				get
		        {
					if(_SchedulePath_W == null)
	        	    {
						_SchedulePath_W = TearOff.SchedulePath;
					}
					return _SchedulePath_W;
				}
			}

			private AggregateParameter _CompanyID_W = null;
			private AggregateParameter _EnName_W = null;
			private AggregateParameter _ArName_W = null;
			private AggregateParameter _EnAddress_W = null;
			private AggregateParameter _ArAddress_W = null;
			private AggregateParameter _UserName_W = null;
			private AggregateParameter _Password_W = null;
			private AggregateParameter _CityID_W = null;
			private AggregateParameter _CategoryID_W = null;
			private AggregateParameter _SubCategoryID_W = null;
			private AggregateParameter _Tele_W = null;
			private AggregateParameter _Fax_W = null;
			private AggregateParameter _WebSite_W = null;
			private AggregateParameter _LogoPath_W = null;
			private AggregateParameter _EnBranches_W = null;
			private AggregateParameter _ArBranches_W = null;
			private AggregateParameter _MapPath_W = null;
			private AggregateParameter _EnAbout_W = null;
			private AggregateParameter _ArAbout_W = null;
			private AggregateParameter _EnContact_W = null;
			private AggregateParameter _ArContact_W = null;
			private AggregateParameter _PackageTypeID_W = null;
			private AggregateParameter _SchedulePath_W = null;

			public void AggregateClauseReset()
			{
				_CompanyID_W = null;
				_EnName_W = null;
				_ArName_W = null;
				_EnAddress_W = null;
				_ArAddress_W = null;
				_UserName_W = null;
				_Password_W = null;
				_CityID_W = null;
				_CategoryID_W = null;
				_SubCategoryID_W = null;
				_Tele_W = null;
				_Fax_W = null;
				_WebSite_W = null;
				_LogoPath_W = null;
				_EnBranches_W = null;
				_ArBranches_W = null;
				_MapPath_W = null;
				_EnAbout_W = null;
				_ArAbout_W = null;
				_EnContact_W = null;
				_ArContact_W = null;
				_PackageTypeID_W = null;
				_SchedulePath_W = null;

				this._entity.Query.FlushAggregateParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffAggregateParameter _tearOff;
			
		}
	
		public AggregateClause Aggregate
		{
			get
			{
				if(_aggregateClause == null)
				{
					_aggregateClause = new AggregateClause(this);
				}
		
				return _aggregateClause;
			}
		}
		
		private AggregateClause _aggregateClause = null;	
		#endregion
	
		protected override IDbCommand GetInsertCommand() 
		{
		
			SqlCommand cmd = new SqlCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_CompaniesInsert]";
	
			CreateParameters(cmd);
			
			SqlParameter p;
			p = cmd.Parameters[Parameters.CompanyID.ParameterName];
			p.Direction = ParameterDirection.Output;
    
			return cmd;
		}
	
		protected override IDbCommand GetUpdateCommand()
		{
		
			SqlCommand cmd = new SqlCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_CompaniesUpdate]";
	
			CreateParameters(cmd);
			      
			return cmd;
		}
	
		protected override IDbCommand GetDeleteCommand()
		{
		
			SqlCommand cmd = new SqlCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_CompaniesDelete]";
	
			SqlParameter p;
			p = cmd.Parameters.Add(Parameters.CompanyID);
			p.SourceColumn = ColumnNames.CompanyID;
			p.SourceVersion = DataRowVersion.Current;

  
			return cmd;
		}
		
		private IDbCommand CreateParameters(SqlCommand cmd)
		{
			SqlParameter p;
		
			p = cmd.Parameters.Add(Parameters.CompanyID);
			p.SourceColumn = ColumnNames.CompanyID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.EnName);
			p.SourceColumn = ColumnNames.EnName;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.ArName);
			p.SourceColumn = ColumnNames.ArName;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.EnAddress);
			p.SourceColumn = ColumnNames.EnAddress;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.ArAddress);
			p.SourceColumn = ColumnNames.ArAddress;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.UserName);
			p.SourceColumn = ColumnNames.UserName;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Password);
			p.SourceColumn = ColumnNames.Password;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.CityID);
			p.SourceColumn = ColumnNames.CityID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.CategoryID);
			p.SourceColumn = ColumnNames.CategoryID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.SubCategoryID);
			p.SourceColumn = ColumnNames.SubCategoryID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Tele);
			p.SourceColumn = ColumnNames.Tele;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Fax);
			p.SourceColumn = ColumnNames.Fax;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.WebSite);
			p.SourceColumn = ColumnNames.WebSite;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.LogoPath);
			p.SourceColumn = ColumnNames.LogoPath;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.EnBranches);
			p.SourceColumn = ColumnNames.EnBranches;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.ArBranches);
			p.SourceColumn = ColumnNames.ArBranches;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.MapPath);
			p.SourceColumn = ColumnNames.MapPath;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.EnAbout);
			p.SourceColumn = ColumnNames.EnAbout;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.ArAbout);
			p.SourceColumn = ColumnNames.ArAbout;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.EnContact);
			p.SourceColumn = ColumnNames.EnContact;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.ArContact);
			p.SourceColumn = ColumnNames.ArContact;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.PackageTypeID);
			p.SourceColumn = ColumnNames.PackageTypeID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.SchedulePath);
			p.SourceColumn = ColumnNames.SchedulePath;
			p.SourceVersion = DataRowVersion.Current;


			return cmd;
		}
	}
}
